1 Introduction

Made from the strands of the flax plant, linen is a textile prized for its inherent brilliance, breathability, and absorbency. Because of its extreme durability and comfort, it is a well-liked option for summer apparel, bedding, and other home goods. Linen’s crisp texture and capacity to soften with each wash add to its timeless charm, even though it tends to wrinkle. Defects that may occur during production can greatly deteriorate the quality of the product because the line has a tight structure and even minor defects can actually make the product completely defective. Therefore, it must undergo strict control. Monitor processing is also used for control because defects actually cause changes in appearance, so by using the linen image, any differences on the image can be detected thanks to monitor processing.

2 Background information

What has been done in the literature regarding the process monitoring on linen?

As we were asked to do in this project, in the research conducted, first of all, image processing plays a very important role in linen defect detection. Converting the sample taken to gray scale and then detecting defects after creating the luminance matrix is the basis of most research. There are different methods after obtaining the gray scale. The simplest of these is to check whether the pixels in the gray scale matrix exceed the threshold value. If a pixel is outside the limit luminance values, it is quite possible that there is a defect there. However, since this method is a very simple method, there is a high probability of missing different defects on the image. That’s why various advanced methods are also used.

Most of these advanced methods are based on classification/clustering methods and deep learning. However, in this project, we will try to detect these defects with monitoring processes and control charts.

3 Approach

The image assigned to our group is “0030.jpg”. The original image is seen below:

After some online search, it is found that this image is taken from (“Standard Fabric Defect Glossary” 2023) and the defect in the image is classified as “Tight End”. This nonconformity occurs when a warp end is woven more tightly than its neighboring warp ends. Therefore, the increased tension causes the filling in that section to elevate to the surface. It is considered to be a severe defect in the field of fabric manufacturing.

In the image, the defective part is the vertical line in the center that is slightly lighter than its the surrounding area.

Here is the information about the image:

## Image. Width: 512 pix Height: 512 pix Depth: 1 Colour channels: 3

Before analyzing this 512x512 image, we need to convert it to grayscale. The grayscale version of the image is displayed below:

3.1 Statistical Data Analysis Perspective

The data analysis perspective’s main aproach is to fit a distribution to the luminance values of the photo and detect the pixels that are outside 0.001 and 0.999 probability limits

First of all, we need the histogram of the grayscale linen photo.

The linen valeus are stacked around 0.4, and the distribution is positively skewed (the tail of the distribution is longer to the right side). An interesting point is that the luminance values are also dense near 0.0 (black) and 1.0 (white). Moreover, since we know that the luminance values cannot take values outside the 0-1 range, the distribution that we are going to fit can be truncated to these values.

In the following sections, we fit different distributions and choose the best one:

3.1.1 Fitting a Truncated Normal Distribution

The normal distribution, also known as the Gaussian distribution or bell curve, is a symmetric probability distribution that is characterized by its distinctive bell-shaped curve. The tails of the distribution extend infinitely in both directions. While the curve approaches but never reaches the x-axis, the tails asymptotically diminish. Because of this, the dense luminance values around 0.0 and 1.0 is omitted and the truncated normal distribution is fitted using only the data between 1 and 99th quantiles.

Here is the fitted truncated normal distribution:

##        mean            sd     
##   0.3904376754   0.2242056266 
##  (0.0005198907) (0.0004479473)

3.1.2 Fitting a Truncated Gamma Distribution

The shape of the Gamma distribution depends on two parameters: k (shape parameter) and θ (scale parameter). The Gamma distribution is typically right-skewed, meaning that the tail on the right side is longer than the left side. This is especially pronounced when the shape parameter is small.

Here is the fitted truncated gamma distribution:

##       shape         scale   
##   11.56036048   16.78676687 
##  ( 0.03180154) ( 0.04719515)

The truncated gamma distribution looks like a better fit when compared to the truncated normal distribution. Therefore, we proceed with this distribution for the next steps of the statistical data analysis procedure.

3.1.3 Identification of the Outliers

In this step, we find the outlier pixels using the gamma distribution. Outliers are the pixel values that are either below 0.001 or above 0.999 probability limits:

The statistical analysis method could not identify the “tight end” defect in the image. According to the analysis, the right side of the image has defective pixels scattered almost uniformly.

### Statistical Analysis of the Patches of the Image

In this step, we set a window size of 51x51 and apply the previous steps for the 51x51 patches of the image. This allows us to analyze the data more locally.

Analyzing the data locally in 51x51 windows did not change the result of the previous analysis that much. This method failed to detect the tight end of the fabric.

## Control Chart Perspective

In this section, we examined each pixel separately and created a control chart based on the luminance average of the columns and rows in which they are located. A separate control chart was created for each row and each column, and the luminance of the pixels exceeding the limits of the control chart created according to these rows and columns was updated to 0. When we look at the final version of the image, from the perspective of the control chart, we see that there are many alarms, especially on the right side of this line, and these areas may be defective. However, in this perspective, it is very likely that there will be many false alarms or misses because each pixel is evaluated only within its own row and column, and whether there is a correlation with other pixels close to it is not taken into account. Therefore, we can say that this method is not very efficient.

3.2 Our proposal

In this method, when creating the control chart, rather than considering the average and variance of the entire row or the entire column, it would be more logical to consider the 120 pixels around a pixel and detect defects by determining whether the pixel in the center exceeds the control chart limits created by the average and variance of these 120 pixels. Because we think that it would not make sense to consider the value of a pixel at the other end of the linen when determining whether a pixel at the far left of the linen is defective or not, so we followed such a method.

4 Overall Comparison of Our Proposal

## Found files: 0015.jpg 0171.jpg 0044.jpg 0194.jpg 0191.jpg

5 Results

In Linen, there is a correlation between pixels (very small points of Linen) and previous pixels. Pixels luminance may vary consequently however, for example, several pixels in a row having similar brightness may mean that there is a detect in that part of the line, but in simple control charts, the brightness of these pixels may be overlooked since they remain within the control limits, and this may cause a type II error. To avoid that, we need to determine variables for control chart process and these variables must consider most recent observations -means closest pixels both in columns and rows-.

6 Conclusions and Future Work

There are many methods for linen defect detection and it is necessary to decide which one is the most efficient among these methods. Considering the methods we discuss in this report, they all have their own advantages and disadvantages. However, it may not be correct to say that a point or group of points containing a defect is connected to the pixels at the other end of the line, so we thought it would be more logical to decide whether a pixel is defective compared to the surrounding pixels in the control chart we created in the last method. Although it is difficult to say for sure whether the result obtained is correct or not, we can say that the Type II error, that is, the miss rate, will be lower than simple methods. In order to develop this method, it may be necessary to calculate how many or which pixels are connected to the pixels that are close to it. Of course, a separate method should be developed to determine this.

References

“Standard Fabric Defect Glossary.” 2023. Cotton Incorporated. https://www.cottoninc.com/quality-products/textile-resources/fabric-defect-glossary/.